Electronic device with supervisor circuit for detecting resistance parameter of an energy storage device

ABSTRACT

An electronic device has an energy storage device and circuitry supplied with a storage device voltage from the energy storage device. A supervisor circuit enables the circuitry in response to the storage device exceeding an enable threshold voltage. The supervisor circuit detects a resistance parameter which is indicative of an internal resistance of the energy storage device and adjusts the enable threshold voltage based on the resistance parameter.

BACKGROUND Technical Field

The present technique relates to the field of electronic devices. Moreparticularly, the technique relates to electronic devices having anenergy storage device in which circuitry is enabled when a storagedevice voltage from the energy storage device exceeds an enablethreshold voltage.

An electronic device may have an energy storage device, such as abattery or a capacitor. A storage device voltage supplied from theenergy storage device may vary over time, for example depending ontemperature or on the energy consumption of the circuitry supplied withthe voltage. The circuitry may require a minimum voltage to operate, andso the circuitry may be enabled only if the storage device voltageexceeds an enable threshold voltage.

SUMMARY

Viewed from one aspect, the present technique provides an electronicdevice comprising:

an energy storage device;

circuitry supplied with a storage device voltage from the energy storagedevice; and

a supervisor circuit configured to enable the circuitry in response tothe storage device voltage exceeding an enable threshold voltage;

wherein the supervisor circuit is configured to detect a resistanceparameter indicative of an internal resistance of the energy storagedevice and to adjust the enable threshold voltage based on theresistance parameter.

In known systems, the enable threshold voltage is typically a fixedthreshold set to accommodate worst case conditions. When the storagedevice voltage exceeds the threshold and the circuitry is enabled, acurrent is drawn from the energy storage device which causes animmediate drop in the storage device voltage. The voltage drop isproportional to the internal resistance of the energy storage device.The internal resistance can vary, because for example the resistance maybe temperature dependent and may increase over time as the energystorage device is charged and discharged. Therefore, typically theenable threshold voltage is set with a margin to account for the voltagedrop which will occur on enabling the circuitry in the worst casescenario expected over the lifetime of the storage device. This extramargin reduces the usable range of voltages at which the circuitry canoperate and delays the circuitry being enabled so that less efficientuse is made of the energy available.

To address these issues, the present technique provides a supervisorcircuit which detects a resistance parameter indicative of an internalresistance of the energy storage device and which adjusts the enablethreshold voltage based on the resistance parameter. This allows theenable threshold voltage to be adapted to the changing internalresistance of the energy storage device, avoiding the need for anyadditional margin in the enable threshold voltage. This allows thecircuitry to be enabled earlier without a delay caused by the margin.Also, by accounting for the resistance of the energy storage device, therisk of the circuitry oscillating between enabled and disabled statescan be reduced.

The energy storage device may be a battery or may be a capacitor orsupercapacitor. The internal resistance of a capacitor tends to remainrelatively constant with time (unlike a battery where the resistancetends to increase with increasing numbers of charge/discharge cycles).Even if the resistance does not vary significantly over time, thepresent technique may still be useful since the circuitry and supervisorcircuit may be designed for use with a range of different types ofenergy storage devices which may have different resistances, and thepresent technique allows the supervisor circuit to automatically adaptto the particular resistance of the energy storage device that has beenselected. This avoids the need to margin the enable threshold voltagebased on the energy storage device with the worst case resistance.

However, the present technique is particularly useful if the energystorage device is a battery. Battery health declines with dischargecycles and so the internal resistance of the battery may increase overtime. By adapting the enable threshold voltage to the internalresistance of the battery, it is not necessary to margin he thresholdbased on the worst case resistance expected, which would cause asignificant delay in enabling the circuitry when the battery is near thestart of its lifetime. This technique is particularly advantageous forsmall electronic devices such as wireless sensor nodes which employsmall batteries having a high internal resistance, e.g. of the order of7 kΩ.

The energy storage device may be provided with an energy harvesting unitfor harvesting ambient energy which is used to charge the energy storagedevice. Depending on the amount of ambient energy available, the voltageprovided from the storage device may vary, and so devices with energyharvesting units may often apply an enable voltage threshold fordetermining whether to enable the circuitry. Hence, the presenttechnique is particularly useful for devices having an energy harvestingunit, such as wireless sensor nodes. The energy harvesting unit may forexample comprise a photovoltaic cell for harvesting energy from solarradiation, a thermoelectric device for harvesting energy fromtemperature gradients, a vibration harvester for harvesting energy fromacoustic or mechanical vibrations, or an electromagnetic energyharvester for harvesting energy from electromagnetic radiation such asradio waves.

The supervisor circuit may disable the circuitry in response to thestorage device voltage dropping below a disable threshold voltage. Thedisable threshold voltage may be less than the enable threshold voltage.This provides some hysteresis to avoid oscillation where the circuitryis repeatedly enabled and disabled in quick succession. With previoussystems using a fixed threshold, a large margin between the enable anddisable thresholds is required to ensure that when the circuitry isenabled, the IR voltage drop does not cause the storage device voltageto drop below the disable threshold voltage even when the energy storagedevice has a very high resistance. By adapting the enable thresholdvoltage to the detected resistance parameter, it is not necessary toprovide such a margin, so that the enabling of the circuitry is notdelayed unnecessary and so the total amount of time when the voltage ishigh enough to use the circuitry can be increased.

The supervising circuit may adjust the enable threshold voltage invarious ways. For example, the enable threshold voltage can be set to avalue which corresponds to a sum of a target threshold voltage and amargin voltage, with the margin voltage depending on the resistanceparameter. Hence, the target threshold voltage may be the effectivethreshold voltage at which it is desired to turn on the circuitry (inthe ideal case assuming there is no IR drop), and the margin voltagerepresents the expected IR drop which would occur when the circuitry isenabled, so that even when the internal resistance increases, afterenabling the circuitry the storage device voltage will settle at theeffective threshold voltage. For example, the margin voltage maycorrespond to I_(SYSTEM)×R_(STORAGE), where I_(SYSTEM) is the maximumcurrent drawn by the circuitry when enabled and R_(STORAGE) is theinternal resistance of the storage device. In small wireless systems,the current I_(SYSTEM) when enabling the circuitry is typicallywell-defined since wireless sensor nodes tend to have a well-definedoperation which does not vary significantly. Therefore, it is feasibleto update the threshold voltage to the target threshold voltage plusI_(SYSTEM)×R_(STORAGE) based on the measured resistance parameterrepresenting R_(STORAGE).

Although the enable threshold voltage may correspond to the sum of thetarget threshold voltage and a margin voltage, it is not necessary toactually perform this addition. Instead, the supervising circuit mayhave a range of threshold voltage levels available and may select one ofthese threshold voltages which is expected to correspond to the sum ofthe target threshold voltage of the margin voltage. For example thesupervisor circuit may have a threshold voltage generator whichgenerates multiple different threshold levels (for example, using avoltage divider). The resistance parameter may then be used to selectone of the voltages generated by the threshold voltage generator, foruse as the enable threshold voltage. The threshold voltage generator maybe configured so that the relationship between the resistance parameterand the selected enable threshold voltage level tracks the expected sumof the target threshold voltage and the margin voltage when the marginvoltage is proportional to the resistance.

The supervisor circuit may trigger the detection of the resistanceparameter and adjustment of the enable threshold voltage at any time,for example periodically or in response to certain events. In oneexample, the detection of the resistance parameter and the adjustment ofthe enable threshold voltage may occur in response to the storage devicevoltage exceeding a current value of the enable threshold voltage.Hence, when the storage device voltage exceeds the current threshold andso the circuitry would normally be enabled at this point, the supervisorcircuit detects the resistance parameter and adjusts the enablethreshold voltage to reflect the measured resistance of the energystorage device. This avoids the need to repeatedly adjust the enablethreshold when the voltage still remains below the previous thresholdanyway, and also enables the circuitry for triggering the enable signalto be reused for also triggering the resistance monitoring. Thisapproach may be useful for storage devices where the internal resistanceis generally expected to increase with time (e.g. a battery for whichthe resistance increases with discharge cycles). However, if there is alikelihood that the resistance could sometimes decrease, then it may beuseful to also perform further recalibrations of the enable threshold,for example triggered periodically, to ensure that the circuitry is notleft permanently in the disabled state.

The supervisor circuit may implement a delay between the storage devicevoltage exceeding the enable threshold and enabling the circuitry. Thiscan be useful for several reasons. Firstly, the circuitry may need to bereset before it is enabled and so the delay period provides time forthis. Also, providing a delay helps guard against oscillations which canoccur when the storage device voltage only temporarily rises above theenable threshold and then falls below it again. Hence, if the storagedevice voltage no longer exceeds the threshold by the end of the delayperiod, then enabling of the circuitry can be inhibited. This mechanismis also useful when the threshold voltage is being adjusted, since theadjustment to the threshold triggered by the storage device voltagerising above the previous threshold may cause the threshold to be sethigher, so that by the end of the delay period the storage devicevoltage no longer exceeds the threshold. Hence, the delay provides timefor the resistance monitoring to complete to avoid enabling thecircuitry if the IR drop would cause the voltage to drop too low.

There may be various ways of measuring the resistance of the energystorage device. The supervisor circuit may have a test current generatorwhich draws a test current from the energy storage device for testingthe internal resistance of the energy storage device. When a testcurrent is drawn, the response of the system to the test current maygive an indication of the internal resistance.

Drawing a test current from the energy storage device may cause avoltage drop and if the circuitry is still connected to the storagedevice voltage then this could cause errors. Therefore, an isolationswitch may be provided to isolate the circuitry from the storage devicevoltage when the test current is drawn from the energy storage device.

In one example, the monitored resistance parameter may indicate anamount by which the storage device drops when the test current isapplied. The voltage drop may depend on the product of the amount oftest current drawn and the internal resistance of the storage device,and so if the amount of test current is known then the internalresistance can be deduced.

Alternatively, the test current generator may include at least onecapacitive element coupled across the energy storage device. When thetest current is drawn, there may be a voltage drop, and then the storagedevice voltage may rise again with a rate that depends on both thecapacitance of the at least one capacitive element and the internalresistance of the storage device. Hence, by measuring a parameter whichdepends on the rate at which the voltage rises, the internal resistancecan be monitored.

For example, the resistance parameter may comprise a count value whichrepresents a time taken for the storage device voltage to rise to asample voltage level following the voltage drop caused by the testcurrent. For example, the sample voltage level may be set to a fractionof a level that the storage device voltage had prior to drawing the testcurrent. By setting the sample voltage level relative to the storagevoltage level, variation in the storage voltage level does not affectthe measured count value, which will depend on the RC time constant ofthe capacitive element and storage device, not on other factorsaffecting the voltage level such as temperature or circuit load. Acounter may increment the count value in response to a count clocksignal until the storage device voltage exceeds the sample of voltagelevel (the counter may be start counting either at the point when thevoltage drops in response to the test current, or at a later point whenthe voltage rises above a count start threshold). A clock generator forgenerating the count clock signal may be powered by a regulated voltageprovided by a voltage regulator, which is useful to prevent the clockfrequency of the clock generator varying with system currentconsumption.

The test current may be generated in different ways. However, in oneexample the test current generator may have a number of capacitors andswitches which can select whether the capacitors are coupled in parallelacross the energy storage device or are coupled in series across theenergy storage device. The test current generator may generate the testcurrent by switching the switches from a first state in which thecapacitors are coupled in series to a second state in which thecapacitors are coupled in parallel. When in series, the capacitors aredischarged and charge on the capacitors flows back to the energy storagedevice. When the capacitors are then switched to a parallel state, thestorage device charges the capacitors and a relatively large current isdrawn from the storage device. This test current can then be used tomonitor the internal resistance. In the case where the resistanceparameter represents the RC time constant, the capacitors used forgenerating the test current may also serve as the capacitive elementswhich provide the “C” part of the RC time constant.

Hence, prior to generating the test current, the test current generatormay switch the switches from the second state in which the capacitorsare coupled in parallel (e.g. the state remaining from a previousinstance when the resistance of the storage device was monitored) to thefirst state in which the capacitors are coupled in series. If this isdone suddenly in one step, there can be a large overshoot in the storagedevice voltage which could potentially damage the circuitry. To reducethe likelihood of damage, the capacitors can be switched from the secondstate to the first state in multiple steps with each step coupling onlya subset of the capacitors together in series. By staggering theswitching of the capacitors into the series state, damage to thecircuitry can be reduced.

References to resistance in the present application should beinterpreted as including monitoring of impedance. In general, themonitoring of resistance discussed in the embodiments below can beconsidered as detecting the impedance of the energy storage device at arelatively low frequency. In other systems it is possible to monitor theimpedance at different frequencies and phases and set the voltagethreshold based on the detected impedance.

Viewed from another aspect, the present technique provides an electronicdevice comprising:

energy storage means for storing energy;

circuit means for being supplied with a storage device voltage from theenergy storage means; and

supervising means for enabling the circuit means in response to thestorage device voltage exceeding an enable threshold voltage;

wherein the supervising means is configured to detect a resistanceparameter indicative of an internal resistance of the energy storagemeans and to adjust the enable threshold voltage based on the resistanceparameter.

Viewed from a further aspect, the present technique provides a methodfor an electronic device comprising an energy storage device andcircuitry supplied with a storage device voltage from the energy storagedevice; the method comprising:

detecting whether the storage device voltage exceeds an enable thresholdvoltage;

enabling the circuitry in response to the storage device voltageexceeding the enable threshold voltage;

detecting a resistance parameter indicative of an internal resistance ofthe energy storage device; and

adjusting the enable threshold voltage based on the resistanceparameter.

Further aspects, features and advantages of the present technique willbe apparent from the following description of example embodiments whichare to be read with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically illustrates an example of an electronic device;

FIG. 2 shows a problem which may occur when enabling circuitry in thedevice based on whether a storage device voltage exceeds a fixed enablethreshold voltage;

FIG. 3 shows an electronic device having a supervisor circuit formonitoring the internal resistance of the storage device;

FIG. 4 shows an example of the operation of the system in FIG. 3;

FIG. 5 shows a more detailed example of the supervisor circuit;

FIG. 6 shows an example of a resistance monitoring circuit;

FIG. 7 shows an example of a clock generator for generating clocksignals for controlling the resistance monitor;

FIG. 8 shows an example of varying internal resistance of a battery withdischarge cycles;

FIG. 9 shows tracking error of a hysteresis voltage; and

FIG. 10 shows a method of operating an electronic device.

DESCRIPTION OF EXAMPLES

FIG. 1 schematically illustrates an example of an electronic device 2having an energy storage device 4 for storing energy, such as a batteryor a capacitor. In the subsequent examples, for ease of explanation theenergy storage device 4 is assumed to be a battery, but it will beappreciated that other forms of energy storage device could also beprovided, such as a supercapacitor. The energy storage device 4 may becharged from a wired power supply or from an energy harvesting unit asdiscussed below. The device 2 also has circuitry 6 which receives astorage device voltage provided by the energy storage device 4, and asupervisor circuit 8 for monitoring the storage voltage and selectingwhether to enable the circuitry 6 depending on whether the storagevoltage is greater than an enable voltage threshold. The circuitry 6 maybe any circuitry having a given functionality within the electronicdevice 2, such as a processor, microcontroller, memory unit, radiotransmitter or receiver, etc. If the circuitry 6 is enabled, it canperform its functionality, e.g. processing data, providing access todata stored in the memory, transmitting a radio signal, etc, while whendisabled this functionality cannot be provided. If the circuitry 6 is amemory, data may be retained when the memory is disabled, but access tothe data from other circuits may not be possible when disabled. In thedisabled state, the circuitry 6 consumes less energy than in the enabledstate. For example, power gating may be used to implement thedisabling/enabling of the circuitry 6, with power gates controllingwhether a voltage is supplied to the circuitry 6 or not.

FIG. 2 shows an example of a problem which may occur with systems ofthis type. The battery voltage V_(BAT) varies with time and twothreshold voltages V_(ENABLE) and V_(DISABLE) are set to controlenabling of the circuitry 6 and disabling of the circuitry 6respectively. The enable voltage threshold V_(ENABLE) is set higher thanthe disable voltage threshold V_(DISABLE) with a certain margin V_(HYST)or hysteresis between them. This is because when the voltage rises toV_(ENABLE) and the circuitry 6 is enabled, a current I_(SYSTEM) is drawnfrom the battery 4 by the circuitry 6 so that the battery voltageV_(BAT) immediately drops by an amount R_(BAT)×I_(SYSTEM), where R_(BAT)is the internal resistance of the battery (see part A of FIG. 2).Conversely, when the voltage drops below V_(DISABLE), the reduced systemcurrent means that there is an upward spike in the battery voltage asshown in part B of FIG. 2. If the voltage drop on enabling the circuitryor the voltage rise on disabling the circuitry is larger than thehysteresis margin V_(HYST), the system will oscillate repeatedly betweenthe enable state and the disable state as shown in the right hand part Cof FIG. 2, which would prevent the circuitry 6 from functioningproperly.

Miniature wireless sensor nodes are unique in that they employ verysmall batteries, such as thin film batteries, which have a high internalresistance R_(BAT) (e.g. in the order of 7 kΩ) so there is a risk oflarge IR drops and spikes. Also, battery health declines with increasingnumbers of discharge cycles, so that R_(BAT) may increase for examplefrom 7 kΩ to 31 kΩ over a 1000 discharge cycles. Battery internalresistance is also temperature dependent. Therefore, it is usual toprovide a large hysteresis margin V_(HYST) to accommodate the worst casebattery internal resistance expected over its lifetime. However, formost of its lifetime the battery may have a lower resistance than thisworst case resistance, and so most of the time the margin is unnecessaryhigh, which delays enabling the circuitry, so that the circuitry 6 isidle even when the voltage would have been high enough to support thecircuitry. Also, over time the resistance of the battery increases, andso with a fixed enable threshold the range of voltages V_(USE) at whichthe circuitry 6 can be enabled reduces, as shown in FIG. 2, so there isless chance that the voltage will lie in the usable range. Both thesefactors reduce the amount of “usable time” when the circuitry 6 isenabled.

FIG. 3 shows an example of the electronic device which is provided witha battery supervisor circuit 8 for addressing this problem. In additionto the battery 4, circuitry 6 and battery supervisor circuit 8, thedevice 2 also has an energy harvesting unit for harvesting energy fromambient energy comprising an energy source 10 and an energy harvester12. The energy source 10 may for example comprise a solar (photovoltaic)cell, thermoelectric device or piezoelectric device, or radio frequencyenergy harvester. Some devices may be provided with more than one typeof energy source 10. The ambient energy may be directed energy that isprovided deliberately to the device or may be energy that just happensto be in the vicinity of the device. The energy harvester 12 may forexample be a voltage regulator which provides a regulated voltage forcharging the battery 4. If the energy source 10 generates AC voltagethen the energy harvester 12 may include a rectifier for generating a DCvoltage.

The supervisor circuit 8 is shown in more detail at the bottom of FIG.3. The supervisor circuit 8 has a voltage divider 20 which receives thebattery voltage V_(BAT) and divides it to generate a lower voltageV_(DIV) which corresponds to a given fraction of the battery voltageV_(BAT). A comparator 22 compares the divided voltage V_(DIV) against athreshold voltage V_(TH) generated by a voltage reference generator 23which can generate variable threshold voltages. If the circuitry 6 iscurrently enabled, then the threshold voltage V_(TH) corresponds to thedisable threshold voltage V_(DISABLE), while if the circuitry 6 iscurrently disabled then the threshold voltage V_(TH) represents theenable threshold voltage V_(ENABLE) (in other examples, separatecomparators 22 and reference voltage generators 23 may be provided forthe enable/disable thresholds). The comparator 22 generates a comparatoroutput signal (compout) depending on whether V_(DIV) is greater or lessthan the threshold V_(TH). A power and reset delay generator 24 delaysthe comparator output signal and generates an enable signal for enablingthe circuitry 6 if the comparator output stays high for at least a givendelay period. If the comparator output returns low during the delayperiod, for example if the battery voltage is no longer higher than thethreshold, then the enable signal is disabled to inhibit waking up thecircuitry 6. The supervisor circuit 8 has a battery internal resistancemonitoring circuit (resistance monitor) 26 which detects a resistanceparameter which is indicative of the internal resistance R_(BAT) of thebattery 4. The resistance monitor 26 controls the voltage referencegenerator 23 to vary the enable threshold voltage depending on theresistance parameter.

As shown in FIG. 4, the supervisor circuit 8 adapts the enable thresholdvoltage V_(ENABLE) based on the varying internal resistance R_(BAT) toobtain an effective enable threshold voltage V_(ENABLE.EFF) which isconstant and independent of the internal resistance of the battery 4.When the battery voltage V_(BAT) reaches V_(ENABLE), the resistancemonitor 26 measures the battery resistance by inducing a test currentand measuring the response of the battery voltage V_(BAT) to the testcurrent. For example, the resistance monitor 26 may measure an amount ofvoltage drop caused by the test current, or an RC response as discussedin the examples below, to obtain an indication of the battery resistanceR_(BAT). The enable threshold voltage V_(ENABLE) is updated to a newvalue V_(ENABLE)=V_(ENABLE.EFF) R_(BAT)×I_(SYSTEM.MAX), whereI_(SYSTEM.MAX) is the maximum current drawn by the circuitry 6 whenenabled. The voltage reference generator 24 has a number of availablereference voltages and one of these can be selected depending on themonitor resistance parameter, to give an enable threshold voltage whichat least approximately tracks V_(ENABLE.EFF) R_(BAT)×I_(SYSTEM.MAX).Hence, V_(ENABLE.EFF) represents a target enable threshold which is theideal threshold at which the circuitry 6 would be enabled if there wasno IR voltage drop, and R_(BAT)×I_(SYSTEM.MAX) represents a marginprovided to ensure that when the IR voltage drop occurs followingenabling at the new threshold V_(ENABLE), the voltage will now be at thedesired target voltage V_(ENABLE.EFF). The battery voltage V_(BAT) isnow compared against the new enable threshold voltage and the circuitry6 is enabled if the battery voltage is larger than the new threshold.Otherwise, the system waits for the battery voltage to increase until itis larger than the new threshold, at which point the process repeats.While this technique requires knowledge of the maximum currentI_(SYSTEM.MAX) drawn by the circuitry 6 when enabled, this is feasiblein many small wireless systems because these systems typically have awell defined operation for which a relatively constant current is drawn.In this approach, the effective hysteresis value is V_(ENABLE.EFF)V_(DISABLE), and is independent of the internal resistance R_(BAT) ofthe battery 4. However, as the actual enable threshold voltageV_(ENABLE) is varied based on the monitored internal resistance, thereis no need to provide an additional margin to accommodate worst caseconditions, to avoid the problems described with respect to FIG. 2.

FIG. 5 shows an example circuit which can be used for the supervisorcircuit 8. The voltage divider 20 comprises a number of diode connectedPMOS transistors with the divided voltage being taken from a given pointwithin the chain of transistors. Each transistor experiences a givenvoltage drop across it and so depending on the point from which thedivided voltage is taken, a given ratio between the battery voltageV_(BAT) applied to the start of the chain and the divided voltageV_(DIV) can be provided. One of the transistors can be selectivelyincluded or eliminated from the chain of transistors based on the enablesignal which is applied to a selecting transistor 30. Depending onwhether the enable signal is 0 (circuitry disabled) or 1 (circuitryenabled), the diode connected transistor chain is selected to havedifferent lengths so that, for example, the division ratio may be 3.25when enable is 0 and 3.05 when enable is 1. This is useful for allowingthe same comparator 22 to provide both the comparison against the enablevoltage threshold and the comparison against the disabled threshold. Bydividing the voltage in different ratios, this effectively means thatthe threshold voltage V_(TH) has different levels relative to thedivided voltage V_(DIV), even if the threshold voltage V_(TH) keeps thesame value. In other examples, the voltage divider 20 could have a fixeddivision ratio and the different disable/enable thresholds may beprovided by changing the threshold voltage V_(TH).

The threshold voltage generator 23 similarly includes a chain of diodeconnected transistors. The voltage threshold generator 23 includes aleakage based voltage reference/divider and provides 64 possibleanalogue reference voltages from 1.06 volts to 1.28 volts for theadaptive voltage threshold. This design of reference generator 23 hasbeen simulated as consuming 77 pA while providing 319 ppm/° C. TC and0.17%/V line sensitivity (measured). The reference generator 23 has azero-V_(TH) NMOS transistor 32 at the top of the stack for leakagegeneration and diode connected PMOS transistors 34 which providemultiple outputs to a multiplexer 36 which selects a particularthreshold voltage level depending on an input control signal 38. Thecontrol signal is dependent on the enable signal generated by thesupervisor circuit and on the output of the resistance monitor.

When the divided voltage V_(DIV) is greater than the threshold voltageV_(TH), the comparator separates a high comparator output signal whichtriggers the resistance monitor 26 to start detecting the internalresistance of the battery. The resistance monitor 26 includes capacitorswhich can be coupled in series or parallel to induce a test currentwhich can be used to probe the internal resistance. This is describedmore below with reference to FIG. 6. The resistance monitor 26 producesan output signal dout which controls the multiplexer 36 to select aparticular threshold voltage level. The threshold voltage generator 23is configured so that the mapping between the resistance parameter doutand the selected threshold V_(TH) tracksV_(ENABLE)=V_(ENABLE.EFF)+R_(BAT)×I_(SYSTEM.MAX) as discussed above. Ifthe changed threshold voltage causes V_(DIV) to be below the thresholdV_(TH) then the enable trigger signal will remain low since the timerequired for the resistance detection by the resistance monitor 26 maybe much faster than the power-on reset delay provided by the delaygenerator 24 (for example 17.8 ms for the resistance monitor 26 comparedto a delay of over 50 ms provided by the power-on reset delay generator24). The enable signal also gates the threshold voltage generator, sothat when the enable signal is high (circuitry 6 currently enabled), ANDgate 40 is clamped low to select a fixed threshold voltage V_(TH) whichin combination with the division ratio applied by voltage divider 20implements the disable threshold voltage V_(DISABLE).

The delay generator 24 uses a voltage reference V_(REF1) to drive acurrent source which generates a current I_(DELAY) (3.3 nA in thisexample). The current is mirrored to a capacitor C_(DELAY). When thecomparator output 22 switches high, the current I_(DELAY) startscharging the capacitor C_(DELAY) and eventually the voltage at thecapacitor will rise above a second reference voltage V_(REF2) which iscompared against the voltage at the capacitor using a comparator. Whenthe voltage on the capacitor C_(DELAY) exceeds V_(REF2), an enabletrigger signal (enable_trigger) switches states and this flips the stateof flip flop 42 to assert the enable signal to cause the circuitry 6 tobe enabled. The first reference voltage V_(REF1) compensates thetemperature dependence of the resistor charged by I_(DELAY) to provide atemperature insensitive delay (0.9%/° C. TC, 9.7%/V line sensitivity,measured). The flip flop 42 is reset if the comparator output drops lowbefore the end of the delay period, to inhibit enabling of the circuitry6. It will be appreciated that other forms of delay generator 24 couldalso be provided.

FIG. 6 shows a circuit example of the resistance monitor 26. Theresistance monitor 26 has a test current generator 50 for generating atest current to be drawn from the battery 4, and an RC responsecalculator 52 which calculates the resistance parameter dout based onthe response of the system to the test current. The test currentgenerator 50 has a number of capacitors C_(DC1) to C_(DC4) and switchesS₁-S₅ which can be placed in different states to connect the capacitorseither in series or in parallel across the battery 4. When theresistance monitor 26 is triggered, in steps 1-3 shown in the bottomleft of FIG. 6, the coupling capacitors C_(DC1) to C_(DC4) are placed inseries to discharge them. The capacitors are placed in series graduallyin a number of steps with each step only connecting a subset of thecapacitors in series. This is done to reduce the amount of overshoot ofthe battery voltage V_(BAT) which occurs when each capacitor isconnected in series to discharge the capacitor and cause charge to flowback to the battery 4. While FIG. 6 shows an example with fourcapacitors, it is possible to provide a greater number of capacitors sothat a greater number of steps can be provided from the parallel stateat the beginning of step 1 to the series state at the end of step 3.

Once all the capacitors are in series, a final step 4 is performed tosimultaneously connect all the capacitors in parallel across the battery4 (see step 4 at the bottom of FIG. 6). This creates a large currentdrawn from the battery as the battery voltage charges each of thecapacitors C_(DC1) to C_(DC4). This results in an RC voltage curve onthe battery voltage V_(BAT) which rises with a characteristic timeconstant of R_(BAT)×EC, where EC is the sum of the individualcapacitances of the capacitors C_(DC1) to C_(DC4). The RC responsecalculator 52 measures the RC time constant by comparing the batteryvoltage against an earlier sampled and divided version of the batteryvoltage V_(SAMP). V_(SAMP) is sampled in this example before step 1 ofthe capacitor configuration operation, by closing switch S₅, and isstabilised by opening the switch S₅ (for example between steps 3 and 4).However, in general the V_(SAMP) could be sampled at any time beforeswitching the capacitors from the series state to the parallel state atstep 4. By using a divided version V_(SAMP) of the battery voltage asthe reference for measuring the time curve, the reference level will beset relative to the battery voltage so that the time taken to rise tothe reference level is independent of the level of the battery voltage,providing a more reliable measure of the battery internal resistance.

A ripple counter 56 is triggered to start counting clock cycles when thecapacitors are switched in parallel at step 4. A comparator 54 comparesa voltage V_(DC) at a node between capacitor C_(DC4) and switch S_(4B)with the sample voltage V_(SAMP) and when V_(DC) rises above V_(SAMP)then this triggers a ripple counter 56 to stop counting clock cycles.Hence, the count value dout quantifies the time when V_(DC)<V_(SAMP).Since V_(SAMP) is relative to V_(BAT) then the output dout isinsensitive to V_(BAT). The output dout of the ripple counter is thenused by the threshold generator 23 to select the threshold voltage.While FIG. 6 shows the ripple counter 56 starting to count cycles at thepoint when the voltage drops at step 4, it is also possible to provide afurther sampled reference level lower than V_(SAMP), and to count thenumber of cycles taken for the voltage to rise from the lower referencelevel to V_(SAMP). Regardless of which part of the RC curve is measured,the rise time will be dependent on RC.

In FIG. 6, the voltage compared against V_(SAMP) is the voltage V_(DC)at the node between capacitor C_(DC4) and switch S_(4B). Since switchS_(4B) is closed in step 4, then V_(DC) is the same as the batteryvoltage V_(BAT) at this point. Hence, it would also be possible tocompare V_(BAT) against V_(SAMP) using the comparator 54. However, asshown in the graph at the bottom right of FIG. 6, V_(BAT) is high beforestep 4 while V_(DC) is low. By comparing V_(DC) against V_(SAMP) insteadof V_(BAT), there is no need to ensure that the counter 56 startscounting after the voltage has dropped, simplifying the design of thecounter 56. In general, any voltage level which is proportional to thebattery voltage during step 4 may be compared against V_(SAMP). Theswitch S₅ is closed when detecting V_(SAMP) and is then opened to ensurethat V_(SAMP) is retained during subsequent steps.

An isolating switch S₁ is provided to isolate the circuitry 6 from thebattery voltage V_(BAT) when the resistance is being measured. Byopening switch S₁, the system is protected from the test induced voltagedrop. Since the system operates from a decoupling capacitance (C_(DC0))during this time, the test event is kept short (for example less than 65microseconds). Note that the test capacitors C_(DC1) to C_(DC4) act asstandard decoupling capacitors during the normal operation of thecircuitry 6.

Hence, in general the number of cycles counted by the ripple counter 56is dependent on the internal resistance of the battery 4 because therise time of the voltage is characterised by a time constant whichdepends on the capacitance of the capacitors and the resistance ofbattery 4.

FIG. 7 shows an example of a clock generator for generating clocksignals for the ripple counter 56 and the control signals forcontrolling the switches of the resistance monitor 26. The clockgenerator has a relaxation oscillator 70 which generates a relativelyslow clock signal clk_ro for controlling a switching controller 72 togenerate the control signals for controlling the switches S₁ to S₅ inFIG. 6. A faster current starved oscillator 74 is also provided forgenerating the count clock signal clk_cso for controlling the ripplecounter 56. The clock generator operates from a system supply voltageV_(DD) rather than V_(BAT), because V_(BAT) tends to decrease too lowduring the RC curve generation. However, V_(DD) decreases due to systemcurrent consumption since the switch S₁ is open during RC curvegeneration, and so a voltage regulator 76 is provided for the clockgenerator.

The circuit shown in the above embodiments was fabricated in 180 nmCMOS. The battery supervisor circuit 8 was tested with a miniature 2 μAhthin-film battery (1.375×0.85 mm²) and a sensor system withI_(SYSTEM.MAX)=11 μA. The battery supervisor circuit 8 draws 1 nA duringbattery monitoring and 10 nJ/conv. for R_(BAT) detection. FIGS. 8 and 9show a 500 cycle test of the battery supervisory circuit with the 2 μAhbattery. FIG. 8 shows the measured change in R_(BAT) from 16 kΩ to 54kΩ. FIG. 9 shows that the battery supervisor circuit 8 has a maximumV_(HYST) tracking error of 27 mV. The tracking error represents thedifference between the ideal hysteresis V_(HYST)=V_(ENABLE.EFF)V_(DISABLE) and the actual effective hysteresis achieved correspondingto (V_(ENABLE)=R_(BAT)×I_(SYSTEM)) V_(DISABLE), which arises because thethreshold voltage generator 23 in FIG. 5 has a number of discretethreshold levels which it can select, rather than providing acontinuously varying threshold. Assuming a 50 mV margin, the proposedsystem requires an effective V_(HYST)=50+27=77 mV. In comparison, aconventional system requires 656 mV hysteresis to accommodate the worstcase R_(BAT)=54 kΩ condition after 500 cycles. The proposed batterysupervisory circuit 8 therefore provides 2.7 times the usable batteryvoltage range (V_(BAT) min/max=3.2V/4.2V).

FIG. 10 shows a method of controlling enabling of the circuitry 6depending on the storage device voltage generated by the storage device4. At step 100 the supervisor circuit 8 determines whether the storagedevice voltage exceeds the enable threshold voltage. If not then thesupervisor circuit 8 continues monitoring the storage device voltage.When the storage device voltage exceeds the threshold, then at step 102the supervisor circuit 8 triggers the resistance monitor 26 to measurethe resistance parameter which indicates the internal resistance of thestorage device 4. At step 104 a new threshold value is selected based onthe resistance parameter. Meanwhile, after a delay provided at step 106by the power-on delay generator 24, at step 108 it is determined whetherthe storage device voltage still exceeds the enable threshold voltage.If not then the method returns to step 100. For example, if the storagedevice voltage drops, or the adjustment to the threshold at step 104means the threshold is now higher than the voltage, then the supervisorcircuit 8 inhibits enabling of the circuitry 6. On the other hand, ifthe storage device voltage is higher than the enable threshold voltagethen at step 110 the circuitry is enabled.

The resistance monitor circuit 26 shown in FIG. 6 may also be used forpurposes other than adjusting the enable threshold voltage for enablingcircuitry. For example, the resistance parameter dout provided by theresistance monitor circuit 26 may be used as a general indication of thehealth of the battery 4 or other energy storage device. For example, ifthe resistance gets too high then this could indicate that the batteryshould be replaced, for example. Hence, the supervisor circuit 8 mayoutput a warning signal if the resistance parameter indicates that theresistance is higher than a given threshold. The warning signal may thenbe used to trigger a visual or audible indication that the battery is,or will soon become, unusable. Hence, in general an electronic devicemay have a resistance monitoring circuit for monitoring an internalresistance of an energy storage device, the resistance monitoringcircuit comprising any one or more of the following features incombination:

-   -   the resistance monitoring circuit may comprise a test current        generator configured to draw a test current from the energy        storage device for testing the internal resistance of the energy        storage device.    -   the resistance monitoring circuit may comprise an isolation        switch configured to isolate the circuitry from the storage        device voltage when the test current is drawn from the energy        storage device.    -   the test current generator may comprise at least one capacitive        element coupled across the energy storage device, and the        resistance parameter may be indicative of a rate with which the        storage device voltage rises following a voltage drop caused by        the test current being drawn from the energy storage device.    -   the resistance parameter may comprise a count value representing        a time taken for the storage device voltage to rise to a sample        voltage level following the voltage drop caused by the test        current.    -   the sample voltage level may correspond to a fraction of a level        of the storage device voltage captured prior to drawing the test        current from the energy storage device    -   the resistance monitoring circuit may have a counter configured        to increment the count value in response to a count clock signal        until the storage device voltage exceeds the sample voltage        level;    -   a clock generator for generating the count clock signal may be        powered by a regulated voltage.    -   the test current generator may comprise a plurality of        capacitors and a plurality of switches for selecting whether the        capacitors are coupled in parallel or coupled in series across        the energy storage device    -   the test current generator may be configured to generate the        test current by switching the plurality of switches from a first        state in which the plurality of capacitors are coupled in series        across the energy storage device to a second state in which the        plurality of capacitors are coupled in parallel across the        energy storage device.    -   before generating the test current, the test current generator        may switch the plurality of switches from the second state to        the first state.    -   the test current generator may switch the plurality of switches        from the second state to the first state in a plurality of        steps, each step for coupling a subset of the capacitors in        series.

Although illustrative embodiments of the invention have been describedin detail herein with reference to the accompanying drawings, it is tobe understood that the invention is not limited to those preciseembodiments, and that various changes and modifications can be effectedtherein by one skilled in the art without departing from the scope andspirit of the invention as defined by the appended claims.

We claim:
 1. An electronic device comprising: an energy storage device;circuitry supplied with a storage device voltage from the energy storagedevice; and a supervisor circuit configured to enable the circuitry inresponse to the storage device voltage exceeding an enable thresholdvoltage; wherein the supervisor circuit is configured to detect aresistance parameter indicative of an internal resistance of the energystorage device and to adjust the enable threshold voltage based on theresistance parameter.
 2. The electronic device according to claim 1,wherein the energy storage device comprises a battery.
 3. The electronicdevice according to claim 1, comprising an energy harvesting unitconfigured to harvest ambient energy, wherein the energy storage deviceis charged based on the energy harvested by the energy harvesting unit.4. The electronic device according to claim 1, wherein the supervisorcircuit is configured to disable the circuitry in response to thestorage device voltage dropping below a disable threshold voltage,wherein the disable threshold voltage is less than the enable thresholdvoltage.
 5. The electronic device according to claim 1, wherein thesupervisor circuit is configured to adjust the enable threshold voltageto have a value corresponding to a sum of a target threshold voltage anda margin voltage, wherein the margin voltage depends on the resistanceparameter.
 6. The electronic device according to claim 1, wherein thesupervisor circuit comprises a threshold voltage generator configured togenerate a plurality of different threshold voltage levels and to setthe enable threshold voltage to one of the plurality of thresholdvoltage levels selected based on the resistance parameter.
 7. Theelectronic device according to claim 1, wherein the supervisor circuitis configured to trigger detection of the resistance parameter andadjustment of the enable threshold voltage in response to the storagedevice voltage exceeding a current value of the enable thresholdvoltage.
 8. The electronic device according to claim 1, wherein thesupervisor circuit is configured to enable the circuitry after a delayperiod has elapsed following the storage device voltage exceeding theenable voltage threshold; and if the storage device voltage no longerexceeds the enable voltage threshold before the end of the delay period,then the supervisor circuit is configured to inhibit enabling of thecircuitry.
 9. The electronic device according to claim 1, wherein thesupervisor circuit comprises a test current generator configured to drawa test current from the energy storage device for testing the internalresistance of the energy storage device.
 10. The electronic deviceaccording to claim 9, comprising an isolation switch configured toisolate the circuitry from the storage device voltage when the testcurrent is drawn from the energy storage device.
 11. The electronicdevice according to claim 9, wherein the resistance parameter isindicative of an amount by which the storage device voltage drops whenthe test current is drawn from the energy storage device.
 12. Theelectronic device according to claim 9, wherein the test currentgenerator comprises at least one capacitive element coupled across theenergy storage device, and the resistance parameter is indicative of arate with which the storage device voltage rises following a voltagedrop caused by the test current being drawn from the energy storagedevice.
 13. The electronic device according to claim 9, wherein theresistance parameter comprises a count value representing a time takenfor the storage device voltage to rise to a sample voltage levelfollowing the voltage drop caused by the test current.
 14. Theelectronic device according to claim 13, wherein the sample voltagelevel corresponds to a fraction of a level of the storage device voltagecaptured prior to drawing the test current from the energy storagedevice.
 15. The electronic device according to claim 13, comprising acounter configured to increment the count value in response to a countclock signal until the storage device voltage exceeds the sample voltagelevel; wherein a clock generator for generating the count clock signalis powered by a regulated voltage.
 16. The electronic device accordingto claim 9, wherein the test current generator comprises a plurality ofcapacitors and a plurality of switches for selecting whether thecapacitors are coupled in parallel or coupled in series across theenergy storage device; wherein the test current generator is configuredto generate the test current by switching the plurality of switches froma first state in which the plurality of capacitors are coupled in seriesacross the energy storage device to a second state in which theplurality of capacitors are coupled in parallel across the energystorage device.
 17. The electronic device according to claim 16, whereinbefore generating the test current, the test current generator isconfigured to switch the plurality of switches from the second state tothe first state.
 18. The electronic device according to claim 17,wherein the test current generator is configured to switch the pluralityof switches from the second state to the first state in a plurality ofsteps, each step for coupling a subset of the capacitors in series. 19.The electronic device according to claim 1, wherein the supervisorcircuit is configured to output a warning signal if the resistanceparameter indicates that the internal resistance of the energy storagedevice is higher than a threshold resistance.
 20. An electronic devicecomprising: energy storage means for storing energy; circuit means forbeing supplied with a storage device voltage from the energy storagemeans; and supervising means for enabling the circuit means in responseto the storage device voltage exceeding an enable threshold voltage;wherein the supervising means is configured to detect a resistanceparameter indicative of an internal resistance of the energy storagemeans and to adjust the enable threshold voltage based on the resistanceparameter.
 21. A method for an electronic device comprising an energystorage device and circuitry supplied with a storage device voltage fromthe energy storage device; the method comprising: detecting whether thestorage device voltage exceeds an enable threshold voltage; enabling thecircuitry in response to the storage device voltage exceeding the enablethreshold voltage; detecting a resistance parameter indicative of aninternal resistance of the energy storage device; and adjusting theenable threshold voltage based on the resistance parameter.